<?php
namespace app\common\validate;

use think\Validate;

class Orders extends Validate
{
    protected $rule = [
        'ordersn'  => 'require',
        'mid'      => 'require',
        'uid'      => 'require',
        'price'    => 'require|>=:0.01',
        'amount'   => 'require|>=:0.01',
        'm_phone'  => 'require',
        'm_name'   => 'require',
    ];

    protected $message = [
        'm_phone'  => 'require',
        'm_name'   => 'require',
    ];

    protected $scene = [
        'add' => ['ordersn','mid','uid','price','amount','m_phone','m_name'],
    ];
}